﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Cms.Web.CmsSystem.MasterPage
{
    public partial class AdminForm : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public string ActionName {
            get {
                int a = EntLib.Request.GetInt("a",-2);
                string act = "none";
                switch (a) { 
                    case 0:
                        act = "add";
                        break;
                    case 1:
                        act = "modify";
                        break;
                    case 2:
                        break;
                    default :
                        act = "none";
                        break;
                }
                return act;
                
            }
        }
        public string ReocrdId {
            get {
                string id = EntLib.Request.GetString("id");
                if (!String.IsNullOrEmpty(id))
                {
                    return id;
                }
                else if(ActionName=="add"){
                    return Guid.NewGuid().ToString();
                }
                else
                    return "-1";
            }
        }
    }
}